﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Cherry.Agile.RpcService
{
    /// <summary>
    /// 服务处理扩展接口
    /// </summary>
    public interface IServiceExtentProcessor
    {
        /// <summary>
        /// 开始处理
        /// </summary>
        /// <param name="requestBuffer">处理上下文</param>
        void ProcessOnStarting(ProcessContext context);

        /// <summary>
        /// 结束处理
        /// </summary>
        /// <param name="context">处理上下文.</param>
        void ProcessOnEnding(ProcessContext context);

        /// <summary>
        /// 跟踪异常信息
        /// </summary>
        /// <param name="ex">处理上下文</param>
        void ProcessTrace(Exception ex, ProcessContext context);

        /// <summary>
        /// 跟踪信息输出
        /// </summary>
        /// <param name="traceMessage">The trace message.</param>
        /// <param name="context">处理上下文.</param>
        void ProcessTrace(string traceMessage, ProcessContext context);
    }
}
